package com.example.controller;

import lombok.extern.slf4j.Slf4j;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@Slf4j
@RestController
public class HelloController {
    @RequestMapping("/hello")
    @PreAuthorize("hasAnyAuthority('select')") //权限本身就是用字符串来进行管理
    public String hello(){
        return "你好";
    }
}
